<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<input id="val" type="text" />
		<span id="result"></span>
		<button id="btn">计算</button>
		<button id="test">对比</button>
	</body>
	<script>
		
		const btn = document.getElementById("btn");
		const test = document.getElementById("test");
		const result = document.getElementById("result");
		btn.onclick = function(){
			const val = document.getElementById("val").value;
			const w = new Worker('./fb.js');
			w.postMessage(val);
			w.onmessage = function(e){
				result.innerText = e.data;
			}
		}
		test.onclick = function(){
			console.log("123")
		}
	</script>
</html>
